package com.qzsoft.system.modules.permission.group.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.qzsoft.jeemis.common.entity.BaseEntity;
import com.qzsoft.jeemis.common.validator.group.DefaultGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * 菜单信息表(ServiceMenu)表实体类
 *
 * @author zt
 * @since 2020-08-28 09:48:04
 */
@ApiModel(value = "菜单信息表")
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ToString
@TableName("sys_user_group")
public class SysUserGroupEntity extends BaseEntity {
    private static final long serialVersionUID = -45626516681731890L;

    /**
     * id主键
     */
    @TableId(type = IdType.ASSIGN_ID) //主键ASSIGN_ID策略
    @ApiModelProperty(value = "id主键")
    // @NotBlank(message = "{id.require}", groups = UpdateGroup.class)
    private Long id;


    /**
     * userId
     */
    @ApiModelProperty(value = "userId")
    private Long userId;
    /**
     * 用户组id
     */
    @ApiModelProperty(value = "用户组id")
    @NotBlank(message = "用户组编码不能为空", groups = DefaultGroup.class)
    private String groupId;


    /**
     * 0:存在 1:删除 默认：0
     */
    @ApiModelProperty(value = "0:存在 1:删除 默认：0")
    private Integer hasDelete;

    /**
     *创建者
     */
    @ApiModelProperty(value = "创建者")
    @TableField(fill = FieldFill.INSERT)
    private Long creator;
    /**
     *创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createDate;
    /**
     *更新者
     */
    @ApiModelProperty(value = "更新者")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updater;
    /**
     *更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateDate;
}
